﻿<?xml version="1.0" encoding="UTF-8"?>
<ExtensionModel>
	<Extension path="/MonoDevelop/Ide/Commands">
		<Command id="PerformanceDiagnosticsAddIn.StartStopListeningUIThreadMonitorHandler"
			defaultHandler="PerformanceDiagnosticsAddIn.StartStopListeningUIThreadMonitorHandler"
			_label="Start monitoring UIThread hangs" />
		<Command id="PerformanceDiagnosticsAddIn.ProfileFor5SecondsHandler"
			defaultHandler="PerformanceDiagnosticsAddIn.ProfileFor5SecondsHandler"
			_label="Profile for 5 seconds" />
		<Command id="PerformanceDiagnosticsAddIn.SpinDumpFor5SecondsHandler"
			defaultHandler="PerformanceDiagnosticsAddIn.SpinDumpFor5SecondsHandler"
			_label="SpinDump for 5 seconds" />
		<Command id="PerformanceDiagnosticsAddIn.DumpLiveWidgetsHandler"
			defaultHandler="PerformanceDiagnosticsAddIn.DumpLiveWidgetsHandler"
			_label="Dump live widgets" />
		<Command id="PerformanceDiagnosticsAddIn.ToggleProfileHandler"
			defaultHandler="PerformanceDiagnosticsAddIn.ToggleProfileHandler"
			type="check"
			_label="Toggle profiling" />
		<Command id="PerformanceDiagnosticsAddIn.EnhanceSampleFile"
			defaultHandler="PerformanceDiagnosticsAddIn.EnhanceSampleFile"
			_label="Enhance Sample output file"
			_description="Use this command to covert JITed method addresses to full method names of Sample tool output file." />
	</Extension>
	<Extension path="/MonoDevelop/Ide/MainMenu/Help">
		<ItemSet id="Diagnostics" _label="_Diagnostics">
			<CommandItem id="PerformanceDiagnosticsAddIn.StartStopListeningUIThreadMonitorHandler" />
			<CommandItem id="PerformanceDiagnosticsAddIn.ProfileFor5SecondsHandler" />
			<CommandItem id="PerformanceDiagnosticsAddIn.ToggleProfileHandler" />
			<CommandItem id="PerformanceDiagnosticsAddIn.EnhanceSampleFile" />
			<CommandItem id="PerformanceDiagnosticsAddIn.SpinDumpFor5SecondsHandler" />
		</ItemSet>

		<Condition id="FeatureSwitch" name="WidgetLeaks" optIn="true">
			<ItemSet id="Diagnostics" _label="_Diagnostics">
				<CommandItem id="PerformanceDiagnosticsAddIn.DumpLiveWidgetsHandler" />
			</ItemSet>
		</Condition>
	</Extension>
	<Extension path="/MonoDevelop/Ide/PreStartupHandlers">
		<Condition id="FeatureSwitch" name="WidgetLeaks" optIn="true">
			<Class class="PerformanceDiagnosticsAddIn.InitializeGtkHelperHandler" />
		</Condition>
	</Extension>
	<Extension path="/MonoDevelop/Ide/GlobalOptionsDialog">
		<Section id="PerformanceDiagnostics"
			_label="Performance Diagnostics"
			insertafter="VersionControl">
			<Section id="PerformanceDiagnosticsGeneral"
				_label="General"
				fill="true"
				class="PerformanceDiagnosticsAddIn.GlobalOptionsPanel"
				icon="md-prefs-performance" />
		</Section>
	</Extension>

	<Extension path = "/MonoDevelop/Ide/Pads">
		<Condition id="FeatureSwitch" name="WidgetLeaks" optIn="true">
			<Pad id = "PerformanceDiagnosticsAddIn.LeakTrackerPad"
				_label="Leak Tracker"
				icon="md-errors-list"
				group="Logs"
				class = "PerformanceDiagnosticsAddIn.LeakTrackerPad"/>
		</Condition>
	</Extension>
	
	<Extension path="/MonoDevelop/Ide/WorkbenchLayouts/Solution">
		<Condition id="FeatureSwitch" name="WidgetLeaks" optIn="true">
			<LayoutPad id="PerformanceDiagnosticsAddIn.LeakTrackerPad" status="AutoHide" />
		</Condition>
	</Extension>
</ExtensionModel>